import { createRouter, createWebHistory } from "vue-router";

import Home from "../views/Home.vue";
import Login from "../views/Login.vue";
import NavigationBar from "../components/NavigationBar.vue";
import GoodsSourse from "../views/GoodsSourse.vue";

const routes = [
    {
        path: '/login',
        component: Login
    },
    {
        path: '/',
        component: Home,
        children:[
            {
                path: '/',
                component:GoodsSourse
            }
        ]
    },
    {
        path: '/test',
        component: NavigationBar
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes: routes
});

export default router